include("shared.lua")
include("cl_item.lua")
include("cl_itemlist.lua")

function CommUpgrade:Open()
	
	if !self.MainGUI then
		self.MainGUI = vgui.Create("DFrame")
		
		self.MainGUI:ShowCloseButton( true )
		self.MainGUI:SetDeleteOnClose( false )
		self.MainGUI:SetBackgroundBlur( false )
	end
		
	self.MainGUI:SetSize( ScrW() * 0.75, ScrH() * 0.75 )
	self.MainGUI:Center()
	
	if !self.PanelList then
	
		self.PanelList = vgui.Create("DPanelList", self.MainGUI )
		self.PanelList:EnableVerticalScrollbar( true )
		self.PanelList:SetSpacing( 1 )
		self.PanelList:SetPadding( 1 )
		
		hook.Call("UpgradesStart", GAMEMODE )
	
	end

	
	self.PanelList:SetPos( 5, 23 )
	self.PanelList:SetSize( self.MainGUI:GetWide() - 10, self.MainGUI:GetTall() - 29 )
	
end

function CommUpgrade:GetWide()
	return self.MainGUI:GetWide() - 10
end

function CommUpgrade:AddItem( item )

	if !self.PanelList then
		return
	end
	
	


end